<template>
  <OrderCommon :orderList="orderList" :loading="loading" @orderCanceled="handleOrderCanceled" @refreshOrders="handleRefreshOrders" />
</template>
<script setup>
import OrderCommon from "@/components/OrderCommon";
const props = defineProps({
  orderList: {
    type: Array,
    default: () => [],
  },
  loading: {
    type: Boolean,
    default: false,
  },
});

const emit = defineEmits(['orderCanceled', 'refreshOrders']);

const handleOrderCanceled = (orderId) => {
  emit('orderCanceled', orderId);
};

const handleRefreshOrders = () => {
  emit('refreshOrders');
};
</script>
